<template>
    <div>
        <template v-if="OrdersList.acceptOrdersList.length != 0">
            <div class="row">
                <Card class="col-sm-3" v-for="childrenItem of OrdersList.acceptOrdersList" :key="childrenItem.id"
                    :card-info="childrenItem" mobile="1"  >
                </Card>
            </div>

        </template>
        <div v-if="OrdersList.acceptOrdersList.length == 0" class="empty_box">
            <a-empty description="暂无接单" />
        </div>

    </div>
</template>


<script lang="ts" setup>
import { reactive, ref, onMounted } from 'vue';
import Card from "@/components/Card/index.vue";
import { acceptOrders } from "@/api/user/index"


const OrdersList = reactive({
    acceptOrdersList: [] as any[],
})

onMounted(() => {
    getAcceptOrders()
})
async function getAcceptOrders() {
    const res = await acceptOrders({
        page: 1,
        limit: 24
    })
    OrdersList.acceptOrdersList = res.data.data.data;
    

}
</script>

<style lang="scss" scoped>
.empty_box {
    width: 100%;
    text-align: center;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
}
</style>